package test2;

import test1.MyThread;
// 3个窗口卖100张票，利用同步方法完成
// 技巧 可以先同步代码块
public class ThreadDemo {
    public static void main(String[] args) {
        MyRunnable runnable = new MyRunnable();

        Thread t1= new Thread(runnable);
        Thread t2= new Thread(runnable);
        Thread t3= new Thread(runnable);

        t1.start();
        t2.start();
        t3.start();
    }
}
